'use strict';

const Service = require('egg').Service;

class VoteService extends Service {
    async add(obj) {
        let res = await this.app.mysql.insert('vote', {...obj,chooseList:obj.chooseList.join(',')})
        return res;
    }
    async getlist(obj){
        console.log(obj)
        
       return await this.app.mysql.select('vote', {
           where:obj
       });

    }
   
}

module.exports = VoteService;
